package cn.kgm.makeGodV2.personalityTag;

import cn.kgm.makeGodV2.condition.Condition;
import cn.kgm.makeGodV2.emotion.PersonalityTrait;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * @Version 1.8
 * @Author: Kappi
 * @Date: 2025-9-16 11:36
 * @Description: cn.kgm.makeGodV2.personalityTag.PersonalityTag
 */
@Data
@Builder
@NoArgsConstructor
public class PersonalityTag {
    private String id;
    private String name;
    private String description;
    private Condition condition;
    private int priority; // 优先级，用于解决标签冲突

    public PersonalityTag(String id, String name, String description,
                          Condition condition, int priority) {
        this.id = id;
        this.name = name;
        this.description = description;
        this.condition = condition;
        this.priority = priority;
    }

    public boolean canApply(PersonalityTrait traits) {
        return condition.evaluate(traits);
    }
}
